package com.restaurant.util;

public class Result<T> {
    private int code;
    private String msg;
    private T data;

    //成功响应（带数据）
    public static <T> Result<T> success(String msg, T data) {
        Result<T> result = new Result<>();
        result.code = 200;
        result.msg = msg;
        result.data = data;
        return result;
    }
}
